package com.hippo.database.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hippo.core.pojo.po.Tables;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

/**
 * @ClassName TablesMapper
 * @Description TODO 数据库数据表操作
 * @Author tangxl
 * @create 2023-04-28 16:44
 **/
@Component
public interface TablesMapper extends BaseMapper<Tables>{
    List<Tables> selectAllTables(@Param("databaseName") String databaseName);

    @MapKey("id")
    List<Map<String,Object>> findTableDataMap(@Param("tableName") String tableName);

    @MapKey("Table")
    Map<String,Object> findTableCreateSql(@Param("tableName") String tableName);
}
